<?=$this->form;?>

<?php 
$_moduleName = $controllerName = Zend_Controller_Front::getInstance()->getRequest()->getModuleName();
$_controllerName = $controllerName = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
?>

<?php if(isset($this->paginator)): ?>
<?php if (count($this->paginator)): ?>

<div class="table-datagrid-insertnew">
	<p><a href="<?=$this->url(array('module' => $_moduleName, 'controller'=> $_controllerName,'action'=> 'add'), null, true)?>">Inserir novo</a></p>
</div>

<div class="table-datagrid-total">
	<p>Total: <span><?=$this->total?></span></p>
</div>

<table class="table-datagrid">
	<tr>
		<th width="60%">Nome</th>
		<th width="20%">Sigla</th>
		<th width="20%">Ações</th>
	</tr>

<?php foreach ($this->paginator as $item): ?>
	<tr>
		<td><?= $item['name']; ?></td>
		<td><?= $item['acronym']; ?></td>
		<td>
		<?=$this->dataGridActionOptions(array('update','delete'),$item['id']); ?>
		</td>
	</tr>
	
<?php endforeach; ?>

</table>

<?php endif; ?>
<?= $this->paginationControl($this->paginator, 'Sliding', 'index/paginator_control.phtml'); ?>
<?php endif; ?>